package com.woniuxy.threeproject.end_water_project_user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.woniuxy.threeproject.end_water_project_user.domain.Details;
import com.woniuxy.threeproject.end_water_project_user.dao.DetailsMapper;
import com.woniuxy.threeproject.end_water_project_user.service.IDetailsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 文章详情表 服务实现类
 * </p>
 *
 * @author Lucas
 * @since 2021-08-25
 */
@Service
public class DetailsServiceImpl extends ServiceImpl<DetailsMapper, Details> implements IDetailsService {

    @Autowired
    private DetailsMapper detailsMapper;

    @Override
    public List getDetails(int detailsId) {

//        QueryWrapper<Details> wrapper = new QueryWrapper<>();
//        QueryWrapper<Details> classify_id = wrapper.ge("classify_id", detailsId);
//        List details = detailsMapper.selectList(classify_id);
        List<Details>  details = detailsMapper.getDetails(detailsId);

        return details;
    }
}
